PROJECT(t-dopc-hv)

SET(LIBHV_ROOT ${PROJECT_SOURCE_DIR}/../../../dopc-framework/third/libhv)

INCLUDE_DIRECTORIES(
    ${CMAKE_CURRENT_SOURCE_DIR}/include
    ${LIBHV_ROOT}/include
)

LINK_DIRECTORIES(
    ${LIBHV_ROOT}/lib
)

AUX_SOURCE_DIRECTORY(. SRC_LIST)
SET(LIB_LIST hv pthread)

IF (WIN32)
ADD_DEFINITIONS(-D_WIN32_WINNT=0x600)
LIST(APPEND LIB_LIST ws2_32)
ENDIF (WIN32)

MESSAGE(STATUS "[  SYSTEM  ]: ${CMAKE_SYSTEM_NAME}")
MESSAGE(STATUS "[   LIBHV  ]: ${LIBHV_ROOT}")
MESSAGE(STATUS "[ SRC_LIST ]: ${SRC_LIST}")
MESSAGE(STATUS "[ LIB_LIST ]: ${LIB_LIST}")

ADD_EXECUTABLE(${PROJECT_NAME} ${SRC_LIST})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_LIST})
